package com.imooc.miaosha.dao;

import com.imooc.miaosha.pojo.Goods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("goodsMapper")
public interface GoodsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    int updateByPrimaryKey(Goods record);

    List<Goods> listGoods();

    Integer getGoodsStock(@Param("goodsId") Long goodsId);
    int countGoods();
    List<Goods> selectByIdList(@Param("idList") List<Integer> idList);
}